/*
 * @Author: fishroom
 * @Date: 2022-11-28 16:21:10
 * @LastEditTime: 2022-11-28 17:12:27
 * @FilePath: \koa\app\util\redis.ts
 */
const redis = require("redis");
const client = redis.createClient(6379, "127.0.0.1");
// 连接客户端和服务端【多了这步！！】
client
  .connect()
  .then(() => {
    console.log("Redis connection is successful!");
  })
  .catch(console.error);
export default client;
